'use strict';

function average_to_letter(collection) {

  let result;
  let sum=collection.reduce(
    (a,b)=> a+b
  );
  if(sum%collection.length==0)
    result=String.fromCharCode(96+sum/collection.length);
  else
    result=String.fromCharCode(96+parseInt(sum/collection.length)+1);
  return result;
}

module.exports = average_to_letter;

